#!/usr/bin/python
from math import sqrt

def is_prime(n):
	for i in xrange(2, int(sqrt(n)) + 1):
		if n % i == 0:
			break
	else: 
		return n

lines = 0
num = 1
while 1:
	num += 1
	if is_prime(num) == None:
		continue
	lines += 1
	if lines == 10001:
		break
print lines, is_prime(num)
